<template>
  <div class="home-page">
    <div class="hero-section">
      <div class="container">
        <div class="hero-content">
          <h1 class="hero-title">银行管理系统</h1>
          <p class="hero-subtitle">安全、便捷、高效的银行服务平台</p>
          <div class="hero-buttons">
            <el-button type="primary" size="large" @click="goToLogin">
              <el-icon><User /></el-icon>
              立即登录
            </el-button>
            <el-button size="large" @click="goToRegister">
              <el-icon><UserFilled /></el-icon>
              注册账户
            </el-button>
          </div>
        </div>
        <div class="hero-image">
          <el-icon size="200"><CreditCard /></el-icon>
        </div>
      </div>
    </div>

    <div class="features-section">
      <div class="container">
        <h2 class="section-title">核心功能</h2>
        <div class="features-grid">
          <div class="feature-card">
            <el-icon size="48" color="#1890ff"><Wallet /></el-icon>
            <h3>账户管理</h3>
            <p>便捷的账户开户、信息管理和状态查询</p>
          </div>
          <div class="feature-card">
            <el-icon size="48" color="#52c41a"><Money /></el-icon>
            <h3>转账汇款</h3>
            <p>安全快速的资金转账和汇款服务</p>
          </div>
          <div class="feature-card">
            <el-icon size="48" color="#722ed1"><DocumentCopy /></el-icon>
            <h3>交易记录</h3>
            <p>详细的交易历史查询和对账单下载</p>
          </div>
          <div class="feature-card">
            <el-icon size="48" color="#fa8c16"><Setting /></el-icon>
            <h3>系统管理</h3>
            <p>完善的用户权限和系统配置管理</p>
          </div>
        </div>
      </div>
    </div>

    <div class="stats-section">
      <div class="container">
        <div class="stats-grid">
          <div class="stat-item">
            <div class="stat-number">10,000+</div>
            <div class="stat-label">注册用户</div>
          </div>
          <div class="stat-item">
            <div class="stat-number">99.9%</div>
            <div class="stat-label">系统稳定性</div>
          </div>
          <div class="stat-item">
            <div class="stat-number">24/7</div>
            <div class="stat-label">服务时间</div>
          </div>
          <div class="stat-item">
            <div class="stat-number">100%</div>
            <div class="stat-label">资金安全</div>
          </div>
        </div>
      </div>
    </div>

    <footer class="footer">
      <div class="container">
        <p>&copy; 2024 银行管理系统. All rights reserved.</p>
      </div>
    </footer>
  </div>
</template>

<script>
import { User, UserFilled, CreditCard, Wallet, Money, DocumentCopy, Setting } from '@element-plus/icons-vue'

export default {
  name: 'Home',
  components: {
    User,
    UserFilled,
    CreditCard,
    Wallet,
    Money,
    DocumentCopy,
    Setting
  },
  methods: {
    goToLogin() {
      this.$router.push('/login')
    },
    goToRegister() {
      this.$router.push('/register')
    }
  }
}
</script>

<style lang="scss" scoped>
.home-page {
  min-height: 100vh;
}

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 100px 0;

  .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
  }

  .hero-content {
    flex: 1;
  }

  .hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
  }

  .hero-buttons {
    display: flex;
    gap: 20px;
  }

  .hero-image {
    flex: 1;
    text-align: center;
    opacity: 0.8;
  }
}

.features-section {
  padding: 80px 0;
  background: #f8f9fa;

  .section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 60px;
    color: #333;
  }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
  }

  .feature-card {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;

    &:hover {
      transform: translateY(-5px);
    }

    h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 20px 0 15px;
      color: #333;
    }

    p {
      font-size: 16px;
      color: #666;
      line-height: 1.6;
    }
  }
}

.stats-section {
  padding: 60px 0;
  background: #001529;
  color: white;

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
  }

  .stat-item {
    text-align: center;

    .stat-number {
      font-size: 48px;
      font-weight: 700;
      margin-bottom: 10px;
      color: #1890ff;
    }

    .stat-label {
      font-size: 18px;
      opacity: 0.8;
    }
  }
}

.footer {
  background: #f8f9fa;
  padding: 40px 0;
  text-align: center;
  color: #666;
  border-top: 1px solid #e8e8e8;
}

@media (max-width: 768px) {
  .hero-section {
    .container {
      flex-direction: column;
      text-align: center;
    }

    .hero-title {
      font-size: 36px;
    }

    .hero-buttons {
      justify-content: center;
    }
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
</style>